import React from 'react';
import { TextInput, StyleSheet } from 'react-native';

const styles = StyleSheet.create({
  input: {
    width: 100,
    borderWidth: 1,
    borderColor: '#999',
    borderRadius: 6,
    height: 32,
    textAlign: 'center',
    padding: 0
  }
});

export default props => {
  return (
    <TextInput
      style={styles.input}
      underlineColorAndroid="transparent"
      value={props.value && props.value.toString()}
      onChangeText={props.onChange}
      keyboardType="numeric"
    />
  );
};
